﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Forms.Core.Services;

namespace ContourStrikesAgain.Events
{
    public class SetCookieOnSubmit : umbraco.BusinessLogic.ApplicationBase
    {

        public SetCookieOnSubmit()
        {
            RecordService.RecordSubmitted +=
                new EventHandler<Umbraco.Forms.Core.RecordEventArgs>(RecordService_RecordSubmitted);
        }

        void RecordService_RecordSubmitted(object sender, Umbraco.Forms.Core.RecordEventArgs e)
        {
            umbraco.library.setCookie(e.Form.Id.ToString(), "1");
        }


    }
}